package com.dreamwhale.machinery.controller;


import com.dreamwhale.machinery.config.DataResult;
import com.dreamwhale.machinery.service.YxStoreProductAttrResultService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

/**
 * <p>
 * 商品属性详情表 前端控制器
 * </p>
 *
 * @author Author
 * @since 2020-06-10
 */
@RestController
@RequestMapping("/yxStoreProductAttrResult")
public class YxStoreProductAttrResultController {

    @Resource
    private YxStoreProductAttrResultService yxStoreProductAttrResultService;


    @RequestMapping("inquireGoodsSpecification")
    /**
     * @MethodName : inquireGoodsSpecification
     * @Description : 查询商品规格
     * @param : productId
     * @Author : DragonUncle
     * @Data : 10:48 2020/6/30
     * @return :
     */
    public ResponseEntity<DataResult> inquireGoodsSpecification(Integer productId) {
        return ResponseEntity.ok(yxStoreProductAttrResultService.inquireGoodsSpecification(productId));
    }

    @RequestMapping("/releaseTaskPicture")
    /**
     * @MethodName : releaseTaskPicture
     * @Description : 上传图片
     * @param : file
     * @Author : DragonUncle
     * @Data : 10:48 2020/6/30
     * @return :
     */
    public ResponseEntity<DataResult> releaseTaskPicture(MultipartFile file) {
        return ResponseEntity.ok(yxStoreProductAttrResultService.releaseTaskPicture(file));
    }
}

